/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include "ui数值部件.h"
#include "ui按钮.h"


class C_滚动框 : public C_Widget {
	
public:
	C_滚动框(S_UI创建环境& ctx, bool 横向滚动条, bool 纵向滚动条, C_Widget* view);
	~C_滚动框();

	C_Widget*		m_View;
	S_双向滚动条*	m_双向滚动条;
	float32			m_滚动条厚度;

	ui_绘制模板_画预设图形	m_背景绘制;

	C_Widget*		f_getView();
	//void	f_setSize(vec2 size);
	C_滚动条*		m_横向滚动条;
	C_滚动条*		m_纵向滚动条;
};



class C_分割框手柄 : public C_Widget {

public:
	C_分割框手柄(S_UI创建环境& ctx);
	~C_分割框手柄() {
		C_Widget::~C_Widget();
	}

	uint16	m_分割条ID;
private:

};




class C_分割框 : public C_Widget {

public:
	C_分割框(S_UI创建环境& ctx, E_方向 方向 = E_方向::e_纵向);
	~C_分割框();

	E_方向	m_排列方向;
	std::vector<float32>	m_分割比例;

	ui_绘制模板_画预设图形	m_线绘制;


	void	f_add分割(C_Widget* w,  float32 比例);
	void	f_remove分割(int8 dir);

	//void	f_setSize(vec2 size);
	void	f_分割条移动(float32 局部位置, int16 id);
private:

};




class C_多页面 : public C_Widget {
	uint32	m_页面数量;

public:
	C_多页面(S_UI创建环境& ctx, E_方向 方向 = E_方向::e_纵向);
	~C_多页面();

	E_方向	m_排列方向;
	vec2	m_头大小;
	C_按钮* m_添加按钮;
	bool	m_可关闭;
	ui_绘制模板_画预设图形	m_背景绘制;
	ui_绘制模板_行文本绘制	m_标签绘制;
	ui_绘制模板_图标		m_图标绘制;


	uint32					m_当前页面ID;
	std::vector<float32>	m_分割比例;
	std::vector<C_Widget*>	m_分页面;

	void		f_add页面(C_Widget* w, int8 loc);
	void		f_add页面(std::wstring name, int8 loc);
	C_Widget*	f_del页面(int8 loc);
	void		f_set页面(uint32 id);

private:

};




class C_展开栏 : public C_Widget {
	uint32	m_页面数量;

public:
	C_展开栏(S_UI创建环境& ctx, C_Widget* 内部组件);
	~C_展开栏();

private:

};





class C_动态分列栏 : public C_Widget {
	uint32	m_页面数量;

public:
	C_动态分列栏(S_UI创建环境& ctx);
	~C_动态分列栏();

	
	E_方向	m_排列方向;

	void f_添加项();
private:

};





class C_树形框 : public C_Widget {
	uint32	m_页面数量;

public:
	C_树形框(S_UI创建环境& ctx);
	~C_树形框();

	ui_绘制模板_画预设图形	m_背景绘制;
	ui_绘制模板_行文本绘制	m_标签绘制;

	S_Props m_Value;
	E_方向	m_排列方向;

	//void f_添加项();
private:

};




class C_卡片框 : public C_Widget {
	uint32	m_页面数量;

public:
	C_卡片框(S_UI创建环境& ctx);
	~C_卡片框();

	ui_绘制模板_画预设图形	m_背景绘制;
	ui_绘制模板_行文本绘制	m_标签绘制;

	E_方向	m_排列方向;

private:

};




















